projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a923be9
)
print-editor: Fix a wrong comparison
author
Timm Bäder
<mail@baedert.org>
Thu, 15 Oct 2020 04:05:39 +0000
(06:05 +0200)
committer
Timm Bäder
<mail@baedert.org>
Thu, 22 Oct 2020 15:46:33 +0000
(17:46 +0200)
If error is NULL, replacing the file contents worked and we don't
show the error dialog. The previous version pretty explicitly
dereferenced a NULL pointer by first ensuring that error is NULL and
then accessing error->message.
Found by scan-build
demos/print-editor/print-editor.c
patch
|
blob
|
history
diff --git
a/demos/print-editor/print-editor.c
b/demos/print-editor/print-editor.c
index 416ff9db31946993e24ee69d8a845c00dc7ae4d9..a0c8da320db46f4300c84b759ab0ab2f89824266 100644
(file)
--- a/
demos/print-editor/print-editor.c
+++ b/
demos/print-editor/print-editor.c
@@
-164,7
+164,7
@@
save_file (GFile *save_filename)
NULL,
&error);
- if (error
!
= NULL)
+ if (error
=
= NULL)
{
if (save_filename != filename)
{